

let fs = require("fs")





let strs = fs.readFileSync("./pkmdata.html").toString()


 
let matchs = strs.match(/<tr class="bgwhite">(?:(?!tr>)[\s\S])+<\/tr>/ig)




let pkm_datas = matchs.map(matstr => {
    // 
    
    let ret = {
        name: />(.+)</.exec(matstr.match(/title="[^"]+">([^<]+)<\/a>/g).pop())[1],
        base: {
            "hp": /<td class="bgl-HP">(\d+)/.exec(matstr)[1],
            "at": /<td class="bgl-攻击">(\d+)/.exec(matstr)[1],
            "de": /<td class="bgl-防御">(\d+)/.exec(matstr)[1],
            "sa": /<td class="bgl-特攻">(\d+)/.exec(matstr)[1],
            "sd": /<td class="bgl-特防">(\d+)/.exec(matstr)[1],
            "sp": /<td class="bgl-速度">(\d+)/.exec(matstr)[1],
        }
    };

     
    // 


    return ret



})





fs.writeFileSync("./pkdata1.json", JSON.stringify(pkm_datas, null, 4))

